/**********************************************
 * 
 * File Name				:	OptimisticLockException.java
 * 
 * Last Changed Date		: 	$Date: 2009-08-01 11:12:53 +0800 (星期六, 01 八月 2009) $
 * 
 * Last Changed Revision	:	$Revision: 86 $
 * 
 * Last Changed Author		:	$Author: cfanboy $
 * 
 * File Header URL			:	$HeadURL: svn://www.svnhost.cn/Busi-Building/code/branch/src/com/busibuilding/common/exceptions/OptimisticLockException.java $
 * 
 * ********************************************
 */

package com.busibuilding.common.exceptions;

import com.busibuilding.common.resources.ResourceErrorMessageUtil;

/**
 * Class Name: OptimisticLockException.java 
 * Description: The data access object layer exception
 * @author: YU Zhipeng
 * @version: 1.0
 * @since: 1.0
 * Date: 2009-07-09
 */
public class OptimisticLockException extends DAOException {
	/**
	 * 
	 */
	private static final long serialVersionUID = -9132823498888622498L;

	private String errorCode;
	private String errorMessage;
	
	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}

	public OptimisticLockException(){
		super();
	}
	
	public OptimisticLockException(String errorCode){
		super();
		this.errorCode = errorCode;
		this.errorMessage = ResourceErrorMessageUtil.getStringValue(errorCode);
	}
	
	public OptimisticLockException(String errorCode, Exception ex){
		super();
		this.errorCode = errorCode;
		this.errorMessage = ResourceErrorMessageUtil.getStringValue(errorCode);
	}	
}
